* @param string $container Resolved container name
* @param string $dir Resolved path relative to container
* @param array $params
- * @return Traversable|array|null Returns null on failure
+ * @return Traversable|string[]|null Returns null on failure
*/
abstract public function getFileListInternal( $container, $dir, array $params );
* scripts, so the blacklist needs to check them all.
*
* @param string $filename
- * @return array
+ * @return array [ string, string[] ]
*/
public static function splitExtensions( $filename ) {
$bits = explode( '.', $filename );
* Perform case-insensitive match against a list of file extensions.
* Returns an array of matching extensions.
*
- * @param array $ext
- * @param array $list
+ * @param string[] $ext
+ * @param string[] $list
* @return bool
*/
public static function checkFileExtensionList( $ext, $list ) {
/**
* Get iterator for links for categories.
* @param IDatabase $dbr
- * @param array $ids List of page IDs
+ * @param int[] $ids List of page IDs
* @return Traversable
*/
protected function getCategoryLinksIterator( IDatabase $dbr, array $ids ) {
* @ingroup Maintenance
*/
class CleanupInvalidDbKeys extends Maintenance {
- /** @var array List of tables to clean up, and the field prefix for that table */
+ /** @var array[] List of tables to clean up, and the field prefix for that table */
protected static $tables = [
// Data tables
[ 'page', 'page' ],
}
/**
- * @param array $matches
+ * @param string[] $matches
* @return string
*/
protected function hexChar( $matches ) {
* @param IDatabase $dbw
* @param string[] $indexFields Fields in the index being ordered by
* @param object $row Database row
- * @return array [ string $next, string $display ]
+ * @return string[] [ string $next, string $display ]
*/
private function makeNextCond( $dbw, $indexFields, $row ) {
$next = '';
/**
* Things that were formerly globals and should still be converted
*
- * @var array
+ * @var string[]
*/
protected $formerGlobals = [
'TrackingCategories',
/**
* No longer supported globals (with reason) should not be converted and emit a warning
*
- * @var array
+ * @var string[]
*/
protected $noLongerSupportedGlobals = [
'SpecialPageGroups' => 'deprecated', // Deprecated 1.21, removed in 1.26
/**
* Keys that should be put at the top of the generated JSON file (T86608)
*
- * @var array
+ * @var string[]
*/
protected $promote = [
'name',
* @param FileBackend $src
* @param FileBackend $dst
* @param string $backendRel
- * @return array (rel paths in $src minus those in $dst)
+ * @return string[] (rel paths in $src minus those in $dst)
*/
protected function getListingDiffRel( FileBackend $src, FileBackend $dst, $backendRel ) {
$srcPathsRel = $src->getFileList( [
}
/**
- * @param array $srcPathsRel
+ * @param string[] $srcPathsRel
* @param string $backendRel
* @param FileBackend $src
* @param FileBackend $dst
}
/**
- * @param array $dstPathsRel
+ * @param string[] $dstPathsRel
* @param string $backendRel
* @param FileBackend $dst
* @return void
* Delete one or more revisions from the database
* Do this inside a transaction
*
- * @param array $id Array of revision id values
+ * @param int[] $id Array of revision id values
* @param IDatabase $dbw Master DB handle
*/
- private function deleteRevs( $id, &$dbw ) {
- if ( !is_array( $id ) ) {
- $id = [ $id ];
- }
+ private function deleteRevs( array $id, &$dbw ) {
$dbw->delete( 'revision', [ 'rev_id' => $id ], __METHOD__ );
// Delete from ip_changes should a record exist.
/**
* Get iterator for links for categories.
* @param IDatabase $dbr
- * @param array $ids List of page IDs
+ * @param int[] $ids List of page IDs
* @return Traversable
*/
public function getCategoryLinksIterator( IDatabase $dbr, array $ids ) {
/**
* Get an array of author names from a documentation comment containing @author declarations.
* @param string $comment Documentation comment
- * @return array Array of author names (strings)
+ * @return string[] Array of author names
*/
protected function getAuthorsFromComment( $comment ) {
$matches = null;